package com.woniu.service;

import com.woniu.entity.*;
import com.woniu.util.ResponseUtil;
import java.util.List;

public interface AllService {
    /* 1. 登录 */
    ResponseUtil login(String username, String password);

    /* 2. 商品 */
    ResponseUtil listProducts(Integer categoryId, Integer page, Integer size);
    ResponseUtil getProduct(Integer productId);

    /* 3. 购物车 */
    ResponseUtil addCart(Cart cart);
    ResponseUtil listCart(Integer customerId);
    ResponseUtil deleteCart(Integer cartId);
    ResponseUtil updateCart(Integer cartId, Integer buyNum);

    /* 4. 下单 */
    ResponseUtil createOrder(Order order, List<OrderItem> items, Integer customerId);
    /* 7. 订单详情 */
    ResponseUtil orderDetail(String orderId);

    /* 8. 退单审核 */
    ResponseUtil refundAudit(String orderId);

    /* 9. 确认收货 */
    ResponseUtil confirmReceive(String orderId);
    /* 5. 个人中心 */
    ResponseUtil getCustomer(Integer customerId);
    ResponseUtil listOrders(Integer customerId);


    /* 10. 用户有效地址列表 */
    ResponseUtil listAddress(Integer customerId, Integer defaultOnly);
}